package com.sen.Hard;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class L004_Median_of_Two_Sorted_ArrayTest {

    L004_Median_of_Two_Sorted_Array test = null;

    @Before
    public void setUp() throws Exception {
        test = new L004_Median_of_Two_Sorted_Array();
    }
    @After
    public void tearDown() throws Exception {
        test = null;
    }



    @Test
    public void testFindMedianSortedArrays_1() {
        int[] nums1 = {1, 3};
        int[] nums2 = {2};
        double expected = 2.0;
        assertEquals(expected, test.findMedianSortedArrays(nums1,nums2),0.1);
    }

    @Test
    public void testFindMedianSortedArrays_2() {
        int[] nums1 = {1, 2};
        int[] nums2 = {3, 4};
        double expected = 2.5;
        assertEquals(expected, test.findMedianSortedArrays(nums1,nums2),0.1);
    }
}